import React from 'react'
import { BrowserRouter, HashRouter, Routes, Route, Navigate } from "react-router-dom"
import "./app.css"
import DynamicRouter from "./router/DynamicRouter"
import { Provider } from "react-redux"
import store from "./store"


export default function App() {
  return (
    <Provider store={store}>
      <BrowserRouter>
        <DynamicRouter></DynamicRouter>
        {/* <Routes>
        <Route index={true} element={<Login></Login>}></Route>
        <Route index element={<Login></Login>}></Route>
        <Route path="/reg" element={<Register></Register>}></Route>
        <Route path="/home" element={<Home></Home>}>
          <Route index={true} element={<Main/>}></Route>
          <Route path="user" element={<User/>}></Route>
          <Route path="role" element={<Role/>}></Route>
          <Route path="shop" element={<Shop/>}></Route>
          <Route path="list" element={<List/>}></Route>
          <Route path="category" element={<Category/>}></Route>
          <Route path="updatelist" element={<UpdateList/>}></Route>
          <Route path="addlist" element={<AddList/>}></Route>
          <Route path="salary" element={<Salary/>}></Route>
          <Route path="sales" element={<Sales/>}></Route>
        </Route>
        <Route path="/404" element={<NotFind></NotFind>}></Route>
        <Route path="*" element={<Navigate to="/404"></Navigate>}></Route>
        
      </Routes> */}

      </BrowserRouter>
    </Provider>

  )
}
